/*
 * ScannerMain.cpp
 *
 *  Created on: Apr 8, 2012
 *      Author: hduser
 */

#include "CloudScanner.h"
#include <iostream>

using namespace std;

const char* HDFS_CLOUD_SERVER_HOST = "localhost";
const int HDFS_CLOUD_SERVER_PORT = 54310;

int main(int argc, char *argv[])
{
	char	*mainserver_host = "localhost";
	char	*mainserver_port = "7878";
	char	*cloudserver_host = "localhost";
	char	*cloudserver_port = "54310";
	char 	*strVendorID="43";
	char 	*cloudroot="/home/";


	switch (argc) {

		case 1:
			break;

		case 7:
			mainserver_host = argv[1];
			mainserver_port = argv[2];
			cloudserver_host = argv[3];
			cloudserver_port = argv[4];
			strVendorID=argv[5];
			cloudroot=argv[6];
			break;

		default:
			cerr<<"usage: cmppe295CloudScanner <mainserver_host> <mainserver_port> <cloudserver_host> <cloudserver_port> <vendorid> <cloudroot>\n";
			return -1;
	}

	cout<<"CloudScanner"<<endl;
	CloudScanner* scanner = new CloudScanner();
	cout<<"CloudScanner->scan 1"<<endl;
	scanner->iCSPort = HDFS_CLOUD_SERVER_PORT;
	scanner->scan(strVendorID, cloudroot, mainserver_host, mainserver_port, cloudserver_host, cloudserver_port);

	return 0;
}


